package wechat.rcv.cosuming;

import com.google.common.base.Objects;
import org.eclipse.xtend.lib.annotations.Accessors;
import org.eclipse.xtext.xbase.lib.Pure;
import org.w3c.dom.Document;
import wechat.rcv.util.XmlRequestParser;

@SuppressWarnings("all")
public class RequestObj {
  @Accessors
  private String ToUserName;
  
  @Accessors
  private String FromUserName;
  
  @Accessors
  private String CreateTime;
  
  @Accessors
  private String MsgType;
  
  @Accessors
  private String Event;
  
  @Accessors
  private String EventKey;
  
  @Accessors
  private String AgentID;
  
  @Accessors
  private String MsgID;
  
  @Accessors
  private String Status;
  
  private Document doc;
  
  public RequestObj() {
  }
  
  public RequestObj(final String xml) {
    Document _document = XmlRequestParser.getDocument(xml);
    this.doc = _document;
    boolean _notEquals = (!Objects.equal(this.doc, null));
    if (_notEquals) {
      String _elementByTagFromDoc = XmlRequestParser.getElementByTagFromDoc(this.doc, "ToUserName");
      this.ToUserName = _elementByTagFromDoc;
      String _elementByTagFromDoc_1 = XmlRequestParser.getElementByTagFromDoc(this.doc, "FromUserName");
      this.FromUserName = _elementByTagFromDoc_1;
      String _elementByTagFromDoc_2 = XmlRequestParser.getElementByTagFromDoc(this.doc, "CreateTime");
      this.CreateTime = _elementByTagFromDoc_2;
      String _elementByTagFromDoc_3 = XmlRequestParser.getElementByTagFromDoc(this.doc, "MsgType");
      this.MsgType = _elementByTagFromDoc_3;
      String _elementByTagFromDoc_4 = XmlRequestParser.getElementByTagFromDoc(this.doc, "Event");
      this.Event = _elementByTagFromDoc_4;
      String _elementByTagFromDoc_5 = XmlRequestParser.getElementByTagFromDoc(this.doc, "EventKey");
      this.EventKey = _elementByTagFromDoc_5;
      String _elementByTagFromDoc_6 = XmlRequestParser.getElementByTagFromDoc(this.doc, "AgentID");
      this.AgentID = _elementByTagFromDoc_6;
      String _elementByTagFromDoc_7 = XmlRequestParser.getElementByTagFromDoc(this.doc, "MsgID");
      this.MsgID = _elementByTagFromDoc_7;
      String _elementByTagFromDoc_8 = XmlRequestParser.getElementByTagFromDoc(this.doc, "Status");
      this.Status = _elementByTagFromDoc_8;
    }
  }
  
  @Pure
  public String getToUserName() {
    return this.ToUserName;
  }
  
  public void setToUserName(final String ToUserName) {
    this.ToUserName = ToUserName;
  }
  
  @Pure
  public String getFromUserName() {
    return this.FromUserName;
  }
  
  public void setFromUserName(final String FromUserName) {
    this.FromUserName = FromUserName;
  }
  
  @Pure
  public String getCreateTime() {
    return this.CreateTime;
  }
  
  public void setCreateTime(final String CreateTime) {
    this.CreateTime = CreateTime;
  }
  
  @Pure
  public String getMsgType() {
    return this.MsgType;
  }
  
  public void setMsgType(final String MsgType) {
    this.MsgType = MsgType;
  }
  
  @Pure
  public String getEvent() {
    return this.Event;
  }
  
  public void setEvent(final String Event) {
    this.Event = Event;
  }
  
  @Pure
  public String getEventKey() {
    return this.EventKey;
  }
  
  public void setEventKey(final String EventKey) {
    this.EventKey = EventKey;
  }
  
  @Pure
  public String getAgentID() {
    return this.AgentID;
  }
  
  public void setAgentID(final String AgentID) {
    this.AgentID = AgentID;
  }
  
  @Pure
  public String getMsgID() {
    return this.MsgID;
  }
  
  public void setMsgID(final String MsgID) {
    this.MsgID = MsgID;
  }
  
  @Pure
  public String getStatus() {
    return this.Status;
  }
  
  public void setStatus(final String Status) {
    this.Status = Status;
  }
}
